/* Copyright (C) 2010 Luca Piccinelli
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* 
 * File:   SkinRecNBayesOp.h
 * Author: picci
 *
 * Created on January 2, 2011, 11:35 AM
 */

#ifndef SKINRECNBAYESOP_H
#define	SKINRECNBAYESOP_H

#include <cv.h>

#include "gestface.h"
#include "pipeline/pipeline_data_structures.h"
#include "imgops/skin/functions/skin_recognition.h"

namespace NAMESPACE{

// ****** Functor definition ***************************************************
class SkinRecNBayesFunc{
public:
    bool operator()(const cv::Mat& src,
                    const NormalBayesModel& model,
                    cv::Mat& out_mask,
                    CVT_SPACE cvt_space,
                    int _class);
};
// -----------------------------------------------------------------------------

class SkinRecNBayesOp : public AbstractOperation<SkinRecNBayesFunc>{
public:
    static const size_t MIN_INPUT_NUM;
    static const size_t MIN_CRITERIA_NUM;
    static const size_t MIN_OUTPUT_NUM;

private:
    IOKey k1, k2, k3, k4, k5;

public:
    ~SkinRecNBayesOp();
    SkinRecNBayesOp();
    SkinRecNBayesOp(const SkinRecNBayesOp& op);
    SkinRecNBayesOp& operator=(const SkinRecNBayesOp& op);

    virtual bool doOperation(const std::list<input_t>& inputs,
                             const std::list<criteria_t>& operationCriteria,
                             std::list<output_t>& outputs) throw(bad_io_mapping);

    bool operator==(const AbstractOperation<operation_t>& op) const;
    bool operator!=(const AbstractOperation<operation_t>& op) const;
};

}

#endif	/* SKINRECNBAYESOP_H */

